<template>
  <div class="h100">
    <div class="equipment-top" @click="gohome()">
      <img src="~@/assets/reception/logo.png" />
    </div>
    <div class="edit-department">
      <a-row :gutter="10">
        <a-col :span="12"> 
          <div class="membership-item">服务名称: <span>{{ reviewItems.NAME }}</span></div>
        </a-col>
        <a-col :span="12"> 
          <div class="membership-item">公司名称: <span>{{ reviewItems.GSNAME }}</span></div>
        </a-col>
        <a-col :span="12"> 
          <div class="membership-item">参考服务价格(可议价):<span>{{ reviewItems.CKFWJG }}</span></div>
        </a-col>
        <a-col :span="12"> 
          <div class="membership-item">公司地址:<span>{{ reviewItems.GSDZ }}</span></div>
        </a-col>
        <a-col :span="12"> 
          <div class="membership-item">法人代表:<span>{{ reviewItems.FRDB }}</span></div>
        </a-col>
        <a-col :span="12"> 
          <div class="membership-item">身份证号:<span>{{ reviewItems.SFZH }}</span></div>
        </a-col>
        <a-col :span="12"> 
          <div class="membership-item">联系方式:<span>{{ reviewItems.LXFS }}</span></div>
        </a-col>
        <a-col :span="24">
          <a-col :span="12">
            <div class="membership-item">公司LOGO:<span>
              <img :src=" action + reviewItems.Logo" alt="">
            </span></div>
          </a-col>
          <a-col :span="12"> 
            <div class="membership-item">封面图片:<span>
              <img :src=" action + reviewItems.GSZZZS" alt="">
            </span></div>
          </a-col>
        </a-col>
        <a-col :span="24">
          <!-- <div v-if="reviewItems.SHZT == '审核中'"> -->
            <div class="under-review">
              <img src="~@/assets/reception/file.gif" alt="动态图片" />
              {{ reviewItems.SHZT }}
            </div>

          <!-- </div>  -->
        </a-col>
      </a-row>
    </div>
    <div class="equipment-bac-bottom">
      <img src="~@/assets/reception/background2.png" alt="" />
    </div>
  </div>
</template>

<script>
import { getAppGetUserByIDApi } from '@/api/resService'
import storage from 'store'
import { ACCESS_TOKEN } from '@/store/mutation-types'

export default {
  name: 'RepairForm',
  components: {},
  data() {
    return {
      reviewItems:{},
      action: process.env.VUE_APP_API_BASE_URL,
    }
  },
  methods: {
    displayContent(text) {
      if (text <= 100) {
        return text
      }
      return text.substring(0, 100) + '...'
    },
    gohome() {
      this.$router.push({ path: '/reception/findServices/index' })
    },
    getAppGetUserByID(){
      getAppGetUserByIDApi({
        ID: this.$store.getters.userid,
      }).then((res) => {
          this.reviewItems = res.data[0]
      }).catch((err) => {
        console.log('err',err);
      })
    },
  },
  mounted() {
    this.getAppGetUserByID()
  },
}
</script>

<style lang="less" scoped>
.equipment-top {
  height: 60px;
  background: #fff;
  padding: 10px 100px;
  cursor: pointer;
  img {
    height: 40px;
    display: block;
  }
}
.edit-department {
  margin: 0 auto;
  width: 1000px;
  .membership-item{
    margin: 20px 0;
    font-size: 20px;
    text-align: center;
    span{
      color: #000;
    }
    img{
      height: 150px;
      max-width: 300px;
    }
  }
}
.equipment-bac-bottom {
  position: absolute;
  bottom: 0;
  width: 100%;
  img {
    height: 180px;
    width: 100%;
  }
}
.under-review{
  text-align: center;
  font-size: 24px;
  img{
    display: block;
    margin: 0 auto;
    width: 150px;
    height: 150px;
  }
}
</style>
